﻿namespace ZYCommon
{
    using System;
    using System.Collections;
    using System.Drawing;

    public class TableRow
    {
        private bool bolCanEdit = true;
        private bool bolHeadRow = false;
        private Color intBackColor = Color.Transparent;
        private int intHeight = 30;
        private int intTop = 0;
        private ArrayList myCells = new ArrayList();
        private TableControl myTable = null;
        public object Tag = null;

        public Color BackColor
        {
            get
            {
                return this.intBackColor;
            }
            set
            {
                this.intBackColor = value;
            }
        }

        public int Bottom
        {
            get
            {
                return (this.intTop + this.intHeight);
            }
        }

        public bool CanEdit
        {
            get
            {
                return this.bolCanEdit;
            }
            set
            {
                this.bolCanEdit = value;
            }
        }

        public ArrayList Cells
        {
            get
            {
                return this.myCells;
            }
            set
            {
                this.myCells = value;
            }
        }

        public bool HeadRow
        {
            get
            {
                return this.bolHeadRow;
            }
            set
            {
                this.bolHeadRow = value;
            }
        }

        public int Height
        {
            get
            {
                return this.intHeight;
            }
            set
            {
                this.intHeight = value;
            }
        }

        public int Index
        {
            get
            {
                return this.myTable.Rows.IndexOf(this);
            }
        }

        public TableControl Table
        {
            get
            {
                return this.myTable;
            }
            set
            {
                this.myTable = value;
            }
        }

        public int Top
        {
            get
            {
                return this.intTop;
            }
            set
            {
                this.intTop = value;
            }
        }
    }
}

